package com.eastedu.template.model;

import com.deepoove.poi.data.SeriesRenderData;
import lombok.Data;

/**
 * The type Series data.
 *
 * @author superman
 */
@Data
public class SeriesData {
    /**
     * 名称
     */
    private String name;
    /**
     * 顺序
     */
    private Integer sort;
    /**
     * 对应的数据，需要每一行对应 {@link ChartData#getSeriesCategories()} }长度和顺序一致
     */
    private Number[] seriesValue;
    /**
     * 指定当前序列是柱状，折线还是饼状图
     */
    private SeriesRenderData.ComboType comboType;

    /**
     * Instantiates a new Series data.
     *
     * @param name        the name
     * @param sort        the sort
     * @param seriesValue the series value
     * @param comboType   the combo type
     */
    public SeriesData(String name, Integer sort, Number[] seriesValue, SeriesRenderData.ComboType comboType) {
        this.setName(name);
        this.sort = sort;
        this.seriesValue = seriesValue;
        this.comboType = comboType;
    }

    /**
     * Instantiates a new Series data.
     *
     * @param name        the name
     * @param sort        the sort
     * @param seriesValue the series value
     */
    public SeriesData(String name, Integer sort, Number[] seriesValue) {
        this.setName(name);
        this.sort = sort;
        this.seriesValue = seriesValue;
    }
}
